package com.huawei.hms.support.api.sns;

import com.huawei.hms.core.aidl.IMessageEntity;
import com.huawei.hms.support.api.PendingResultImpl;
import com.huawei.hms.support.api.client.ApiClient;
import com.huawei.hms.support.api.client.Result;
import com.huawei.hms.support.api.client.Status;
import com.huawei.hms.support.api.entity.sns.internal.GetUserUnreadMsgResp;
import com.huawei.hms.support.log.HMSLog;

class HuaweiSnsApiImpl$12 extends PendingResultImpl<UserUnreadMsgCountResult, GetUserUnreadMsgResp> {
    HuaweiSnsApiImpl$12(ApiClient apiClient, String str, IMessageEntity iMessageEntity) {
        super(apiClient, str, iMessageEntity);
    }

    public /* synthetic */ Result onComplete(IMessageEntity iMessageEntity) {
        return a((GetUserUnreadMsgResp) iMessageEntity);
    }

    public UserUnreadMsgCountResult a(GetUserUnreadMsgResp getUserUnreadMsgResp) {
        UserUnreadMsgCountResult userUnreadMsgCountResult = new UserUnreadMsgCountResult();
        userUnreadMsgCountResult.setStatus(Status.SUCCESS);
        userUnreadMsgCountResult.setCount(getUserUnreadMsgResp.getUserUnreadMsg().getFriendMsg());
        HMSLog.i("HuaweiSnsApiImpl", "getUserCount onComplete");
        return userUnreadMsgCountResult;
    }
}
